home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_6.lha
/
7_6
/
tst.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
884b
|
39 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include "7_6a.h"
include "7_6b.h"
include "7_6f.h"
include <stream.h>
ain()
dlist xdlist("hello");
xdlist.append("there");
xdlist.append("how");
xdlist.append("are");
xdlist.append("you");
xdlist.append("today");
void *x;
cout << "forwards\n";
while (xdlist.next(x))
cout << "'" << (char*)x << "'\n";
cout << "\nbackwards\n";
while (xdlist.prev(x))
cout << "'" << (char*)x << "'\n";
xdlist.next(x);
xdlist.next(x);
xdlist.inserthere("Beep");
xdlist.appendhere("Boop");
xdlist.reset();
cout << "\nforwards, removing\n";
while (xdlist.getnext(x))
cout << "'" << (char*)x << "'\n";
cout << "\nbackwards\n";
while (xdlist.getprev(x))
cout << "'" << (char*)x << "'\n";
return 0;